package tongwentongshu.com.app.adapter;

import android.content.Context;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;


import java.util.List;

import tongwentongshu.com.app.R;
import tongwentongshu.com.app.bean.BookDetailsBean;
import tongwentongshu.com.app.bean.BookListBean;
import tongwentongshu.com.app.utils.GlideUtil;

/**
 * https://github.com/CymChad/BaseRecyclerViewAdapterHelper
 */
public class ReadingNotesAdapter extends BaseQuickAdapter<BookDetailsBean.DataBean.ContentarrayBean, BaseViewHolder> {
    private Context mContext;

    public ReadingNotesAdapter(Context mContext, List<BookDetailsBean.DataBean.ContentarrayBean> list) {
        super(R.layout.view_note, list);
        this.mContext = mContext;

    }

    @Override
    protected void convert(BaseViewHolder helper, BookDetailsBean.DataBean.ContentarrayBean item) {
        helper.setText(R.id.tv_user_name, item.getReadingnotepersonname());
        helper.setText(R.id.tv_note_content, item.getReadingnotecontent());
        helper.setText(R.id.tv_note_time, item.getReadingnotepersoncreate_time());
        GlideUtil.setImage(mContext, item.getReadingnotepersonheader(), R.drawable.default_graph, R.drawable.default_graph, (ImageView) helper.getView(R.id.iv_user_image));

    }
}



